﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Yglab.Models;
using Yglab.MyLib;

namespace Yglab.Controllers
{
    public class SettingsController : Controller
    {
        private YgContext conn = new YgContext();

        public ActionResult Index(bool op = false)
        {
            if(op)
            {
                MySettings s = conn.MySettings.FirstOrDefault();
                s.DayNo += 1;
                conn.SaveChanges();

                new MyCronjob().run();
            }
            

            DateTime current = new MyCronjob().getTime();
            
            return View(current);
        }
    }
}
